﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace YZAutoDWR.Migrations
{
    /// <inheritdoc />
    public partial class InitialMigration : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "UserConfig",
                columns: table => new
                {
                    Id = table.Column<int>(type: "INTEGER", nullable: false, defaultValue: 1),
                    AutoStart = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
                    AutoSendEmail = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
                    PlatformUrl = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
                    UserAccount = table.Column<string>(type: "TEXT", maxLength: 10, nullable: true),
                    UserPassword = table.Column<string>(type: "TEXT", maxLength: 20, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserConfig", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "WorkOrder",
                columns: table => new
                {
                    Id = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
                    productId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    moduleId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    ticketTypeId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    ticketTypeName = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
                    operatingSystemId = table.Column<int>(type: "INTEGER", nullable: true),
                    operatingSystemText = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
                    browserId = table.Column<int>(type: "INTEGER", nullable: true),
                    browserText = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
                    title = table.Column<string>(type: "TEXT", maxLength: 500, nullable: true),
                    description = table.Column<string>(type: "TEXT", maxLength: 500, nullable: true),
                    severityId = table.Column<int>(type: "INTEGER", nullable: true),
                    severityText = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    priorityId = table.Column<int>(type: "INTEGER", nullable: true),
                    priorityText = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    ticketStatus = table.Column<int>(type: "INTEGER", nullable: true),
                    ticketStatuText = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    reworkTimes = table.Column<int>(type: "INTEGER", nullable: true),
                    satisfaction = table.Column<int>(type: "INTEGER", nullable: true),
                    evaluation = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    scoring = table.Column<double>(type: "REAL", nullable: true),
                    assigneeId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    assigneeName = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
                    createdUserId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    createdUserName = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
                    maintainerId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    processorId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    processorName = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
                    createdOrganizeCode = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    userDisposeId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    remark = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    resUrl = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    sulutionId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: true),
                    isTimeOut = table.Column<bool>(type: "INTEGER", nullable: true),
                    createdTime = table.Column<DateTime>(type: "TEXT", nullable: true),
                    processedTime = table.Column<DateTime>(type: "TEXT", nullable: true),
                    expectedCompletionTime = table.Column<DateTime>(type: "TEXT", nullable: true),
                    plancompleteTime = table.Column<DateTime>(type: "TEXT", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkOrder", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "UserConfig");

            migrationBuilder.DropTable(
                name: "WorkOrder");
        }
    }
}
